import Vue from 'vue'
import Vuex from 'vuex'
// 导入处理本地存储值
import { setUser, getUser } from '@/utils/storage'

Vue.use(Vuex)
const token = 'token'
export default new Vuex.Store({
  state: {
    user: getUser(token)
  },
  mutations: {
    getUserList(state, data) {
      state.user = data
      setUser(token, data)
    }
  },
  actions: {
  },
  modules: {
  }
})
